Skip to content

packaging: guided set-up, with the choice of the contract executor - #131

Merged
EnzinoBB merged 4 commits into
masterfrom
feat/setup-executor
Oct 30, 2026
Merged

EnzinoBB merged 4 commits into
masterfrom
feat/setup-executor

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Summary

Contains the guided set-up of feat/setup-script (3f2a96c, not yet on master) and adds the choice of the contract executor to it.

Why. Many operators upgrade an official folder by copying only the node binary. The old executor stays. More importantly, the node starts an executor only if the build it reports (its git commit count) is within executor_commit_min..executor_commit_max of config.ini, and stops it otherwise: the node then runs no smart contract (as a confidant it fails every contract execution, getters through its API fail). The official config.ini accepts 1518 only; a community executor counts higher (1543 today). The build number is a local check only: it never reaches the network, and both executors give the same contract results, so either one is compatible with the official nodes.

What the set-up does now (setup.sh, and setup.ps1 behind setup.bat), when config.ini has an executor_command:

  • step 5 "Contract executor" shows the build of the jars in the folder (read from their git.properties with unzip, python3 or the JDK's jar tool; PowerShell: System.IO.Compression) and the range config.ini accepts, warns when contract-executor.jar and sc-api-support.jar come from different builds, and asks community (the latest community build) or official (1518). Enter keeps the kind in the folder;
  • when the jars are not the chosen kind it offers to download them: the community ones from the latest EnzinoBB/contract-executor release, checked against its SHA256SUMS; the official ones out of the CREDITSCOM release package (about 350 MB streamed, only the two jars kept), checked against their known SHA-256. The replaced jars are kept aside: as .official when they are the official ones (choosing official later puts them back without a download), otherwise as .bak-<date>;
  • it then widens executor_commit_min/executor_commit_max in [api] to the build in place, and says so;
  • declined or failed downloads end with what to copy where; unattended (--defaults) nothing is downloaded;
  • every run ends with the reminder: when updating the folder later, copy node, contract-executor.jar and sc-api-support.jar together, then run the set-up again.

README-COMMUNITY.txt explains how to upgrade an existing folder (an official one too). setup-test.yml answers the new question in its runs and adds a step: a folder that kept the official range (the set-up raises executor_commit_max to the package's build), then the same folder without the jars (downloaded from GitHub and checked), on Linux, Windows and macOS.

API and packaging only: nothing in the node changes.

Test plan

  • Linux, official release folder with the community node and setup.sh: community → downloaded build 1543, official jars kept as .official, executor_commit_max=1543; again with official → .official put back; --defaults keeps the jars; a folder with community jars and no backup, official → downloaded from the CREDITSCOM release, SHA-256 equal to the release's (18 s)
  • jar_build with neither unzip nor python3 on the PATH: read with the JDK's jar tool
  • setup.ps1 under PowerShell 7.4 (Linux, curl.exe/tar.exe shims): community download, restore of .official, official download, [api] keys updated in the written config.ini
  • The new setup-test.yml step replayed locally on the community.14 Linux package
  • setup-test.yml on the branch (Linux, Windows, macOS)

🤖 Generated with Claude Code

…onfig.ini accept it

Many operators upgrade an official folder by copying only the node binary: the old executor
stays, and an executor whose build is outside executor_commit_min..max of config.ini is
stopped by the node, which then runs no smart contract (the official config.ini accepts
1518 only, a community executor counts higher).

When config.ini runs an executor, the set-up (setup.sh and setup.ps1) now shows the build of
the jars in the folder (from their git.properties: unzip, python3 or the JDK's jar tool) and
the range config.ini accepts, and asks: community (the latest community build) or official
(1518). When the jars in the folder are not the chosen kind it offers to download them, the
community ones from the latest EnzinoBB/contract-executor release (checked against its
SHA256SUMS), the official ones out of the CREDITSCOM release package (checked against their
known SHA-256); the replaced jars are kept aside (.official, put back by a later choice of the
official executor without a download, or .bak-<date>). Then it widens executor_commit_min/max
to the build in place. Declined or failed, it says what to copy where. Unattended (--defaults)
nothing is downloaded. Every run ends with what to copy when the folder is updated later:
node, contract-executor.jar and sc-api-support.jar together.

README-COMMUNITY.txt explains the upgrade of an existing folder; setup-test.yml answers the
new question and checks a folder that kept the official range and one without the jars.
@EnzinoBB
EnzinoBB merged commit b41f02d into master Oct 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant